from ronglian_sms_sdk import SmsSDK

accId = '8a216da87ba59937017bf7b938c814d9'
accToken = '3a6a2a49acf14ef3b03fc367c88e509a'
appId = '8a216da87ba59937017bf7b939bb14e0'
import json


def send_message(mobile, code, time):
    sdk = SmsSDK(accId, accToken, appId)
    tid = '1'
    datas = (code, time)
    resp = sdk.sendMessage(tid, mobile, datas)
    result = json.loads(resp)
    if result['statusCode'] == '000000':
        return True
    return False
